<?php
/**
 * Created by PhpStorm.
 * User: 共赢岛
 * Date: 2023/12/8
 * Time: 9:51
 */

namespace App\Http\Controllers\API\AnswerSurvey;

use App\Http\Controllers\Controller;

use App\Models\AnswerSurvey;
use App\Services\AnswerSurvey\AnswerSurveyService;
use Illuminate\Http\Request;

class AnswerSurveyController extends Controller
{
    public function index(Request $request)
    {
        $param = $request->all();

        $answer_survey = AnswerSurveyService::one($param['answer_id']);

        return $this->success($answer_survey);
    }

    public function create(Request $request)
    {
        $param = $request->all();

        AnswerSurveyService::create(json_decode($param['param']));

        return $this->success();
    }
}